import 'package:flutter/material.dart';

class MyApp11 extends StatelessWidget {
  const MyApp11({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: const Text(
          '堆叠组件',
          style: TextStyle(color: Colors.white, fontSize: 20),
        ),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      //主体区域
      body: Center(
        //子区域
        child: Stack(
          clipBehavior: Clip.none, //裁剪属性 不裁剪
          alignment: AlignmentDirectional.center,
          children: [
            Container(
              //
              width: 200,
              height: 200,
              color: Colors.cyan,
            ),
            Positioned(
              //
              top: -100,
              child: Image.asset('open_eyes.png'),
            ),
            Icon(Icons.ad_units_outlined, size: 100),
          ],
        ),
      ),
    );
  }
}
